package com.tech.connect.api;

import java.util.HashMap;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.POST;

public class WalletHttp {
    public static Map<String, Object> getMap() {
        return new HashMap<>();
    }

    public interface ConnectApiServer {
        @POST("v1/user/wallet/exchange")
        Observable<BaseEntity<Map<String, Object>>> change(@Body Map<String, Object> map);

        @POST("v1/user/wallet/info")
        Observable<BaseEntity<Map<String, Float>>> info(@Body Map<String, Object> map);

        @POST("v1/user/wallet/payment/page")
        Observable<BaseEntity<Object>> list(@Body Map<String, Object> map);

        @POST("v1/user/wallet/recharge")
        Observable<BaseEntity<Object>> charge(@Body Map<String, Object> map);

        @POST("v1/user/wallet/withdraw")
        Observable<BaseEntity<Object>> coin2Money(@Body Map<String, Object> map);

        @POST("v1/user/wallet/withdraw/account/add")
        Observable<BaseEntity<Object>> way(@Body Map<String, Object> map);

        @POST("v1/user/wallet/withdraw/account/page")
        Observable<BaseEntity<Object>> accountList(@Body Map<String, Object> map);
    }

    public static Observable<BaseEntity<Map<String, Float>>> info(Map<String, Object> map,final BaseEntityOb<Map<String, Float>> ob) {
        return ob.bindObed(ConnectApiManager.getApiServer(ConnectApiServer.class).info(map));
    }


}
